package com.duqc.designpattern.observer;

import org.springframework.context.ApplicationEvent;

import java.util.Map;

/**
 * @ClassName PayEvent
 * @Description 观察者模式（创建支付的事件）
 * @Author duqc
 * @Date 2021/5/11
 **/
public class PayEvent extends ApplicationEvent {
    /**
     * 消息体
     */
    private Map<String, String> map;
    /**
     * 订阅主题
     */
    private String topic;

    public PayEvent(Object source, Map<String, String> map, String topic) {
        super(source);
        this.map = map;
        this.topic = topic;
    }

    public Map<String, String> getMap() {
        return map;
    }

    public void setMap(Map<String, String> map) {
        this.map = map;
    }

    public String getTopic() {
        return topic;
    }

    public void setTopic(String topic) {
        this.topic = topic;
    }
}
